package com.witframework.web.extremetable;

import org.extremecomponents.table.bean.Column;
import org.extremecomponents.table.cell.AbstractCell;
import org.extremecomponents.table.core.TableModel;

/**
 * boolean中文显示列
 * 如果列值为0或“0”或是null显示为中文值“否”
 * 否则显示为“是”
 * @author wuxinyang
 *
 */
public class BooleanCell extends AbstractCell {

	protected String getCellValue(TableModel tablemodel, Column cell) {
		String displayValue="";
		String cellValue=(String)cell.getValue();
		if(cellValue==null||cellValue.length()==0||cellValue.equals("0"))
			displayValue="否";
		else
			displayValue="是";
		return displayValue;
	}	
}
